/**
 * @title
 * @description
 * @author 张玉华
 * @date 2020-11-17 09:39
 */

import { Controller, Get } from '@nestjs/common';
import { OrderService } from './order.service';
import { Order } from '../../entity/Order';

@Controller('order')
export class OrderController {
  constructor(private orderService: OrderService) {}
  @Get('/all')
  getAll(){
    return this.orderService.findAll()
  }

  @Get('/save')
  save(){
    const order = new Order();
    order.date = '2020-11-11';
    order.money = 8888;
    return this.orderService.save(order);
  }

}
